<%@ LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'///////////////////////////////////////////////////////////////////////////////
'// 插件应用:    Z-Blog 1.8 Devo
'// 插件制作:    haphic(http://haphic.esloy.com)
'// 备    注:    DeepEyes 搜索提示
'// 最后修改：   2009-12-29
'// 最后版本:    0.9
'///////////////////////////////////////////////////////////////////////////////
%>
<% Option Explicit %>
<% On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<!-- #include file="../../../c_option.asp" -->
<!-- #include file="../../../function/c_function.asp" -->
<!-- #include file="../../../function/c_function_md5.asp" -->
<!-- #include file="../../../function/c_system_lib.asp" -->
<!-- #include file="../../../function/c_system_base.asp" -->
<!-- #include file="../../../function/c_system_plugin.asp" -->
<!-- #include file="../../../function/c_system_event.asp" -->
<!-- #include file="../../../plugin/p_config.asp" -->
<%
Call System_Initialize()

'检查是否启用
If Not LCase(ZC_BLOG_THEME)=LCase("Couple") Then Call ShowError(48) 

Dim strWords : strWords=Request.QueryString("inpWords")
Call CheckParameter(strWords,"sql",-1)
strWords=FilterSQL(strWords)

Dim Tag
Dim objRS
Dim strSQL
Dim strOutPut

If strWords<>"-1" Then
	strSQL="WHERE [tag_Name] LIKE '%" & strWords & "%'"
Else
	strSQL=""
End If

Dim i:i=8
Dim j:j=0
Set objRS=objConn.Execute("SELECT TOP "& i &" [tag_ID] FROM [blog_Tag] "& strSQL &" ORDER BY [tag_Count] DESC")
If (Not objRS.bof) And (Not objRS.eof) Then
	strOutPut = strOutPut & "<ul>"
	Do While Not objRS.eof
		If j=i Then Exit Do
		strOutPut = strOutPut & "<li><a href="""& Tags(objRS("tag_ID")).Url &"""><span>" & Tags(objRS("tag_ID")).Name & "</span>"& Tags(objRS("tag_ID")).Count  &"</a></li> "
		objRS.MoveNext
		j=j+1
	Loop
	strOutPut = strOutPut & "</ul>"
	strOutPut = strOutPut & "<p><a href=""javascript:void(0)"" onclick=""hideHint();"">"& aryCouple_LanguageValue(57) &"</a></p>"
End If
objRS.Close
Set objRS=Nothing

Response.Write strOutPut

Call System_Terminate()

If Err.Number<>0 then
  Call ShowError(0)
End If
%>

